package FIT::Runner::t::Tally;

use FIT::Test 'FIT::Runner::Tally';

sub error_is_fail: Test {
    my $iut = IUT->new;
    $iut->inc_Error;
    is $iut->is_ok, 0;
}

sub wrong_is_fail_even_with_right: Test {
    my $iut = IUT->new;
    $iut->inc_Wrong;
    $iut->inc_Right for 1..10;
    is $iut->is_ok, 0;
}

sub only_right_is_ok: Test {
    my $iut = IUT->new;
    $iut->inc_Right;
    is $iut->is_ok, 1;
}

sub as_summary_line: Test {
    my $iut = IUT->new;
    $iut->inc_Right;
    $iut->inc_Wrong for 1..3;
    $iut->inc_Error;
    $iut->inc_Skip;
    $iut->inc_Known for 1..2;
    is $iut->as_summary_line, 'right: 1, wrong: 3, error: 1, skip: 1, known: 2';
}

